home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3815 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Unbuffered character input...
  5. Date: 30 Jan 1996 13:31:54 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4em2oaINN54i@keats.ugrad.cs.ubc.ca>
  8. References: <Pine.SGI.3.91.960129190205.27936A-100000@tahiti.cs.unm.edu> <4elf0t$5vd@ixnews2.ix.netcom.com>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <4elf0t$5vd@ixnews2.ix.netcom.com>,
  12. Kevin Landry <kevgar@ix.netcom.com> wrote:
  13. >Caleb Haley <chaley@tahiti.cs.unm.edu> wrote:
  14. >
  15. >>Greetings!
  16. >
  17. >>Just curious--is there a way to do unbuffered character input in c?
  18. >>i.e.  getting just one character without waiting for a carriage return 
  19. >>(enter)...
  20. >
  21. >I believe there are two commands in C that do this. getch() is
  22. >unbuffered input without echo and getche() has the echo. Hope this
  23. >helps.
  24.  
  25. Sigh. C doesn't have commands. C has statements. The getch() and getche() that
  26. you describe are library functions---system-specific library functions,
  27. moreover.  They are not part of the standard library.
  28.  
  29. To those of you who have been regulars of this group for a while, please bear
  30. with me: I will surely kick the habit of responding to clueless DOS
  31. programmers before long. In the past week, I've seen the stupid "how do I get
  32. single characters from the keyboard" asked about thirty times! The replies
  33. are often worse than the questions.
  34. -- 
  35.  
  36.